#include "widget.h"
#include "ui_widget.h"
#include <QDebug>


Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    Tea = new techer(this);
    Stu = new student(this);

    connect(Tea,&Tea->AttendClass,Stu,&Stu->AttendClassSlot);//连接信号和槽函数
}

Widget::~Widget()
{
    delete ui;
}

void Widget::on_pushButton_clicked()
{
    emit Tea->AttendClass();
}
